package com.ruimei.controller;


import com.alibaba.fastjson.JSONObject;
import com.ruimei.entitys.Parent;
import com.ruimei.entitys.Teacher;
import com.ruimei.service.TeacherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 〈概要〉<br>
 * 〈家长控制器〉
 *
 * @author SAGIRI
 * @create 2019/7/22 0022
 * @since 1.0.0
 */

@RestController
@Api(tags = "教师控制器")
public class TeacherController {

    @Resource
    TeacherService service;

    @PostMapping("/teacher/controlPanel")
    @ApiOperation(value = "获取教师信息")
    public Map<String,Object> getTeacherInfo(Teacher teacher){
        return service.getTeacherInfo(teacher);
    }

    @PostMapping("/teacher/controlPanel/update")
    @ApiOperation(value = "修改教师信息")
    public Map<String,Object> setTeacherInfo(Teacher teacher){
        System.out.println(teacher.toString());
        return service.setTeacherInfo(teacher);
    }
}
